package com.cssw.fyzb.core.dao.video;

import com.cssw.fyzb.core.model.dodb.CmfVideoCommentLike;
import org.springframework.stereotype.Repository;

import java.util.Date;

/**
 * @author YangYiQun
 */
@Repository
public class VideoCommentLikeDaoImpl implements VideoCommentLikeDao {

    @Override
    public Long save(Long userId, Long commentId, Long videoId) {
        CmfVideoCommentLike videoCommentLike = new CmfVideoCommentLike();
        videoCommentLike.setCommentId(commentId);
        videoCommentLike.setUserId(userId);
        videoCommentLike.setVideoId(videoId);
        videoCommentLike.setCreateTime(new Date());
        videoCommentLike.save();
        return videoCommentLike.getLikeId();
    }
}
